package cn.mesmile.emqtt.enums;

/**
 * @author zb
 * @date 2021/7/11 15:35
 * @Description
 */
public enum MqttQosEnum {

    /**
     * emqx 发布订阅消息 质量
     */
    Qos0(0,"只会发送一次消息，订阅者不在线就接收不到消息"),
    Qos1(1, "能保证消息被消费，但是可能会重复消息"),
    Qos2(2, "能保证消息被消费，并且只消费一次");

    private final int value;

    private final String description;

    MqttQosEnum(int value, String description){
        this.value = value;
        this.description = description;
    }

    public int value(){
        return this.value;
    }
}
